Skip to content

Add 'show_changes' to "file.append" and "file.prepend" state functions#69009

Closed
meaksh wants to merge 5 commits into
saltstack:masterfrom
meaksh:master-add-show_changes-to-file-append
Closed

Add 'show_changes' to "file.append" and "file.prepend" state functions#69009
meaksh wants to merge 5 commits into
saltstack:masterfrom
meaksh:master-add-show_changes-to-file-append

Conversation

@meaksh
Copy link
Copy Markdown
Contributor

@meaksh meaksh commented Apr 29, 2026

What does this PR do?

This PR adds the show_changes argument to file.append and file.prepend state functions in order to allow hiding the diff of the content as part of the output. Same behavior that file.managed state and others.

What issues does this PR fix or reference?

Fixes #59329 and #67533

Previous Behavior

The output from file.append and file.prepend executions always contains a "diff" when files are text files.

New Behavior

By default, the "diff" is included, but this can be skipped when show_changes is set to False.

Merge requirements satisfied?

Commits signed with GPG?

Yes

@meaksh meaksh requested a review from a team as a code owner April 29, 2026 14:57
@dwoz
Copy link
Copy Markdown
Contributor

dwoz commented May 13, 2026

@meaksh You can add this to 3008.x branch if you want.

@meaksh
Copy link
Copy Markdown
Contributor Author

meaksh commented May 13, 2026

@meaksh You can add this to 3008.x branch if you want.

Closing in favor of #69141

@meaksh meaksh closed this May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE REQUEST] Add show_changes arg to file.(pre|ap)pend

2 participants